<div class="modal-header">
    {{multiLan?('选择业务单据'|translate):'选择业务单据'}}
    <i class="yb-icon ico-close" ng-click="cancel()"></i>
</div>
<div class="modal-body">
    <div class="row">

        <div class="input-bar col-xs-5 wrapper-none pull-right" ng-if="modalType !== 'dealer'">
            <div class="input-group clearfix">
                <input type="text" class="form-control" ng-model="condition[currentType.keyWord[0]]" placeholder="{{multiLan?(currentType.keyWordStr[0]|translate):currentType.keyWordStr[0]}}">
                <span class="input-group-addon cursor-pointer" ng-click="search(1)">{{multiLan?('搜索'|translate):'搜索'}}</span>
            </div>
        </div>
        <div class="search-bar wrapper-none col-xs-12" ng-if="modalType === 'dealer'">
            <div class="normal-search clearfix pull-right">
                <label class="control-label">{{multiLan?(currentType.keyWordStr[0]|translate):currentType.keyWordStr[0]}}：</label>
                <input type="text" class="form-control m-r-sm" ng-model="condition[currentType.keyWord[0]]">
                <label class="control-label">{{multiLan?(currentType.keyWordStr[1]|translate):currentType.keyWordStr[1]}}：</label>
                <input type="text" class="form-control m-r-sm" ng-model="condition[currentType.keyWord[1]]">
                <span class="btn btn-primary" ng-click="search(1)">{{multiLan?('搜索'|translate):'搜索'}}</span>
            </div>
        </div>
        <table class="col-xs-12 table table-fixed m-t-sm">
            <thead>
            <tr>
                <th ng-repeat="item in currentType.field track by $index" width="{{item.width}}">
                    {{item.name}}
                </th>
                <th width="80">{{multiLan?('操作'|translate):'操作'}}</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-if="dataList.length == 0">
                <td colspan="{{currentType.field.length + 1}}" class="text-center">{{multiLan?('暂时没有数据'|translate):'暂时没有数据'}}</td>
            </tr>
            <tr ng-repeat="item in dataList track by $index">
                <td class="spill-dots" title="{{item[field.dataField]}}" ng-repeat="field in currentType.field track by $index">{{item[field.dataField]}}</td>
                <td>
                    <button class="btn btn-operate"
                        ng-disabled="selectedList.indexOf(item.salesOutBillNo)>=0"
                        ng-click="ok($index)">{{multiLan?('选择'|translate):'选择'}}</button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<div class="modal-footer">
    <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
</div>
